The present invention relates to a control system for a sewing machine, and more particularly to a control system capable of stopping the operation of a sewing machine at a desired stop position.
While a fabric is being stitched on a sewing machine in a continuous stitch pattern, for example, it is sometimes necessary to change the direction of stitching. When such a need arises, the operator usually stops the operation of the sewing machine and then changes the direction of stitching. At this time, the operation of the sewing machine should be stopped at a prescribed position since an irregular stitch pattern would otherwise be formed on the fabric. It is also required to stop the sewing needle at a prescribed position when the thread is to be cut after the sewing operation has been finished. Therefore, the sewing machine should be provided with an ability to stop its operation at a prescribed position.
When, however, the sewing machine is being operated at a high speed during the stitching process, the operation of the sewing machine cannot be stopped at the prescribed position merely by deactivating the sewing machine at the prescribed position. It is necessary in such a case to stop the operation of the sewing machine only after the speed of operation thereof has been reduced in preparation for stopping.
FIG. 1 of the accompanying drawings illustrates a previously proposed speed control system which will effect such an operation. This speed control system has a control circuit 10 implemented with a microcomputer including a read-only memory, a random-access memory, and other elements. The control circuit 10 is supplied with an operation command signal S.sub.1, an upper needle position signal UP indicative of an upper needle position, and a lower needle position signal DN indicative of a lower needle position. The signals UP and DN are provided by a detector (not shown) associated with the rotational shaft of the sewing machine (not shown).
The speed control system also has a speed control unit (hereinafter referred to as an "SCU") 12 responsive to a command from the control circuit 10 for controlling a variable-speed motor (not shown) which drives the sewing machine to thereby effect speed control of the sewing machine. The SCU 12 is supplied with a variable-speed command voltage Vc and a speed detection signal PG from the aforementioned detector for controlling the energization coils of an electromagnetic brake BK and an electromagnetic clutch CL which are coupled to the motor.
Operation of the conventional speed control system shown in FIG. 1 will be described with reference to FIGS. 2 and 3. When the operation command signal S.sub.1 in its active state, the control circuit 10 supplies an operation starting command signal to the SCU 12 which energizes the motor at speed determined by the variable-speed command voltage VC to thus start a stitching operation. When the stitching operation is started, the upper needle position signal UP, the lower needle position signal DN, and the speed detection signal PG are issued from the detector to the control circuit 10 and the SCU 12. The upper and lower needle position signals UP and DN applied to the control circuit 10 are employed as discrimination signals for stopping the operation of the sewing machine in upper and lower needle positions when the operation command signal S.sub.1 is eliminated (set to its inactive state).
The process in which the operation of the sewing machine is stopped in the lower needle position will now be described. If the BK coil were energized in response to the detection of the lower needle position signal DN immediately after the operation command signal S.sub.1 is turned off, the position at which the operation of the sewing machine is stopped would vary widely with the speed of operation of the sewing machine, and hence the desired accuracy as to the position of stopping of the sewing machine could not be achieved. To avoid this, the control circuit 10 detects when the speed of operation of the sewing machine has been lowered to a predetermined speed (hereinafter referred to as a "stop-ready speed") at which a desired stopping accuracy can be achieved utilizing the lower needle position signal DN. The speed of operation of the sewing machine is reduced to the stop-ready speed under the control of the SCU 12 based on a command from the control circuit 10.
Whether the speed of operation of the sewing machine has reached the stop-ready speed or not can be determined by measuring, with the control circuit 10, a time T.sub.1 after the lower needle position signal has been turned off and before it is next turned on, as shown in FIG. 2, and comparing the time T.sub.1 with a predetermined time T. If the time T.sub.1 is longer than the time T, then the speed of operation of the sewing machine is determined as being lower than the stop-ready speed.
The flowchart of a program for enabling the control circuit 10 to effect such a speed determination process is illustrated in FIG. 3.
The program includes a step 101 for determining whether the lower needle position signal DN as stored is on or off by ascertaining whether LDlF is "0" or "1". If LDlF=0, then the program goes to a next step 102 which determines whether the lower needle position signal DN is on or not. If the signal DN is off, then a preset time T is set in a step 103, and thereafter LDIF is set to "1" in a step 104.
A step 105 determines again whether the lower needle position signal DN is on or not. If the signal DN is off, then the program branches off to a step 106 in which an off-time T.sub.1 is counted. If the signal DN is on, then LDlF is set to "0" in a step 107, and thereafter a step 108 determines whether the counted off-time T.sub.1 is longer than the preset time T. If T.sub.1 .gtoreq.T, then the program goes to a step 109 in which LSDF is set to "1" otherwise LSDF is set equal to "0" in step 110. When LDDF is set to "1", the control circuit 10 supplies a command for energizing the BK coil to the SCU 12, which energizes the BK coil to brake the motor which drives the sewing machine, thus stopping the sewing machine at the lower needle position. If T.sub.1&gt;T, then LSDF is set to 0, and the program returns to an initial state. If LDlF=1 in the step 101, then the program goes directly to the step 105. If the signal DN is on in the step 102, then the program goes back to the initial state. When off-time T.sub.1 is counted or "YES" outputs are received from steps 102 and 110, the program returns to the main routine as shown by the step labeled "RETURN".
As shown in FIG. 2, the on-time is not counted in the step 108 during an interval in which the signal DN remains on, and the off-time starts being counted when the signal DN is shifted from the off-state to the on-state. The counting goes on until the signal DN is next turned on. When the signal DN is turned on, the measured off-time T.sub.1 is compared with the preset time T. When T.sub.1 =T, that is, when the stop-ready speed is reached, the BK coil is energized to stop the operation of the sewing machine in the lower needle position.
The conventional sewing machine control system thus constructed has suffered from the following disadvantages: Where the lower needle position signal DN has a longer pulse duration in one complete revolution of the main shaft of a sewing machine in which the control system is incorporated, the measured T.sub.1 tends to be shorter at all times than the time T preset by the program, resulting in a failure to detect the stop-ready speed. Where the lower needle position signal DN has a shorter pulse duration, the time T.sub.1 is always longer than the preset time T, and the speed of operation is detected in error as being lower than the stop-ready speed regardless of the fact that the speed of operation is not lower than the stop-ready speed. The SCU 12 then issues a command to energize the BK coil at a time when the speed is too high for the sewing machine operation to stop accurately, with the result that the desired stopping accuracy is not accomplished.